import {request} from "@/network/request";

export function login(data){
    return request({
        url:'/common/login',
        method:'post',
        data:data,
    })
}
export function registerUser(user){
    return request({
        url: '/common/register',
        method: 'post',
        data:user,
    })
}
export function checkUsername(username){
    return request({
        url: '/common/checkUsername',
        method: 'get',
        params:{username}
    })
}
export function getCommonShow(){
    return request({
        url: '/common/getCommonShow',
        method: 'get'
    })
}
export function getAllSimpleRoomType(){
    return request({
        url: '/common/getAllSimpleRoomType',
        method: 'get',
    })
}
export function getCaptcha(){
    return request({
        url: '/common/captcha',
    })
}
export function checkCaptcha(code,key){
    return request({
        url: '/common/checkCaptcha',
        method:'get',
        params:{code,key}
    })
}
export function logout(){
    return request({
        url: '/common/logout',
        method: 'get',
    })
}


